<div id="members">

  <% if artist.members.empty? %>
    There are no members in this band. 
  <% end %>
  
  
  <strong>
    <%= link_to 'Add a Member', new_artist_membership_path(artist), :class => 'lightwindow',
	  															    :params => "lightwindow_type=page,lightwindow_width=600,lightwindow_height=400" %>
  </strong>
  <br />

  <% if !artist.members.empty? %>
    <% artist.members.each do |member| %>

      <div class="edit-member-pane">

          <% if member.member.primary_image.nil? %>
            <img src="/images/REDUX.jpg" alt="Member Art" width="100" height="100" />
          <% else %>
            <%= image_tag member.member.primary_image.url(:small) %>
          <% end %>

          <%= link_to member.member.name, member.member %>

          <span class="member-pane-controls">
            <%= link_to 'x', membership_path(member), :method => :delete %> |
            <%= link_to 'Edit', edit_membership_path(member), :artist_id => artist.id,
															  :class => 'lightwindow',
															  :params => "lightwindow_type=page,lightwindow_width=600,lightwindow_height=400" %>
            &nbsp;
          </span>
          <br />

		<% member.membership_dates.each do |d| %>
		  <%=h d.event %>:
		  <%=h d.date_string_with_month %>
		  <br />
		<% end %>
          Role:<%=h member.role %><br />
      </div><!-- /member-pane -->

    <% end %>
  <% end %>
</div><!-- /members -->
